<template>
	<view class="exchange-content">
		<view class="exchange-cont-title"><view class="exchange-cont-titlebg"></view><text class="exchange-title-text">{{title}}</text></view>
		<view class="options-list">
			<view class="options-li" v-for="(item,i) in list" :key="i">
				<image :webp="true" mode="aspectFill" :style="{width:imgSize+'rpx',height:imgSize+'rpx'}" :src="item.goods_img_url"></image>
				<!-- <text class="options-li-price">{{item.platform_name}}¥{{item.platform_price}}</text> -->
				<view class="will-value-box">
					<icon-heart></icon-heart>
					<text class="will-value">{{item.need_wish_coin}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:'exchange-list',
		props:{
			title:'',
			list:{
				type: Array,
				default(){
					return[]
				}
			},
			imgSize:{
				type:String,
				default:'180'
			}
		}
	}
</script>

<style lang="scss" scoped>
	
	.exchange-content{
		line-height: 1;
	}
	.exchange-cont-titlebg{
		position: absolute;
		top:14rpx;
		left:0rpx;
		z-index: 0;
		width:100%;
		height:0rpx;
		border-bottom:1rpx solid #d8d8d8;
	}
	.exchange-cont-title{
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;
		margin-bottom:20rpx;
		width:100%;
	}
	.exchange-title-text{
		position: relative;
		z-index: 1;
		margin:0rpx auto;
		display: block;
		padding:0rpx 20rpx;
		height:30rpx;
		line-height: 30rpx;
		background-color: #fff;
		font-size: 24rpx;
		color:#999;
		&::before{
			position: absolute;
			content:'';
			left:-8rpx;
			top:10rpx;
			width:11rpx;
			height:11rpx;
			background-color: #d8d8d8;
			transform: rotate(45deg);
		}
		&::after{
			position: absolute;
			content:'';
			right:-8rpx;
			top:10rpx;
			width:11rpx;
			height:11rpx;
			background-color: #d8d8d8;
			transform: rotate(45deg);
		}
	}
	.options-list{
		display: flex;
		justify-content: space-between;
		margin-bottom:60rpx;
	}
	.options-li{
		image{
			display: block;
			// border:1rpx solid #e1e1e1;
			border-radius: 4rpx;
			margin-bottom: 10rpx;
		}
	}
	.options-li-price{
		margin-bottom:6rpx;
		font-size:20rpx;
		color:#666;
	}
	.will-value-box{
		font-size: 24rpx;
	}
	.icon-heart{
	}
	.will-value{
		display: inline-block;
		margin-left: 6rpx;
		color:#E7404A;
		font-weight: bold;
	}
</style>
